﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using Microsoft.Research.Kinect.Nui;
using System.Collections.ObjectModel;
using MSUS.Kinect.SkeletonTracker;
using MSUS.Kinect.SkeletonTracker.Utils;

namespace MSUS.Kinect.GestureEditor.ViewModels
{
	public class MainViewModel : ViewModelBase
	{
		public MainViewModel()
		{

		}

		public IList<Vector> PositionNodes { get; private set; }
		public IList<Vector> ScaledPositionNodes { get; private set; }


		public void LoadVectors(JointPositionHistory jointHistory, int screenWidth, int screenHeight)
		{
			PositionNodes = jointHistory.PositionNodes;
			OnPropertyChanged(() => PositionNodes);

			ScaledPositionNodes = new List<Vector>();
			foreach (Vector v in PositionNodes)
			{
				ScaledPositionNodes.Add(v.ScaleToScreen(screenWidth, screenHeight));
			}

			OnPropertyChanged(() => ScaledPositionNodes);
		}

	}
}
